home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ddx-mips.zip / MIPSFB.H < prev    next >
C/C++ Source or Header  |  1992-04-07  |  3KB  |  84 lines

  1. /*
  2.  * $XConsortium: mipsFb.h,v 1.3 91/07/12 20:48:53 keith Exp $
  3.  *
  4.  * Copyright 1991 MIPS Computer Systems, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of MIPS not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  MIPS makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * MIPS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MIPS
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23. /* $Header: mipsFb.h,v 1.8 92/04/06 21:02:32 dd Exp $ */
  24. #ifndef __DDX_MIPSFB_H
  25. #define    __DDX_MIPSFB_H
  26.  
  27. /* private per-screen information */
  28. typedef struct _MipsScreen {
  29.     char type;        /* screen type */
  30. #define        MIPS_SCRTYPE_DISABLED    0
  31. #define        MIPS_SCRTYPE_COLOR    1
  32. #define        MIPS_SCRTYPE_MONO    2
  33.     char unit;        /* display unit number */
  34.     char bitsPerPixel;    /* bits occupied */
  35.     char depth;        /* bits actually present */
  36.     short dpi;        /* resolution */
  37.  
  38.     short scr_width;    /* visible */
  39.     short scr_height;    /* visible */
  40.     int fb_width;        /* pixels per scanline (fbnorm) */
  41.  
  42.     unsigned char *fbnorm;    /* normal framebuffer mapping */
  43.  
  44.     unsigned char *fbcache;    /* cached framebuffer mapping */
  45.     unsigned char *fbnocache; /* uncached framebuffer mapping */
  46.     unsigned char *fbspec;    /* special framebuffer mapping */
  47.     unsigned char *fbreg;    /* framebuffer registers */
  48.  
  49.     short option;        /* device options */
  50. #define        MIPS_SCR_NOCACHE 1    /* do not cache framebuffer */
  51. #define        MIPS_SCR_NOHW    2    /* do not use HW features */
  52.  
  53.     short cap;        /* device capabilities */
  54. #define        MIPS_SCR_CURSOR    1    /* HW cursor */
  55. #define        MIPS_SCR_PACKED    2    /* packed mode */
  56. #define        MIPS_SCR_FILL    4    /* fill mode */
  57. #define        MIPS_SCR_MASK    8    /* plane mask */
  58.  
  59.     int fd;            /* file descriptor for framebuffer device */
  60.     int fb_mmap_size;    /* saved framebuffer, register mmap size */
  61.     int reg_mmap_size;    /* (used for munmap) */
  62.  
  63.     void (*Blank)();    /* screen blank/unblank */
  64.     void (*WriteCMap)();    /* colormap load */
  65.     void (*Close)();    /* restore normal state */
  66.  
  67.     Bool (*RealizeCursor)(); /* HW cursor support */
  68.     void (*SetCursor)();
  69.     void (*MoveCursor)();
  70.     void (*RecolorCursor)();
  71.     int xhot, yhot;        /* cursor hot spot (device dependent) */
  72.  
  73.     ColormapPtr InstalledMap; /* current colormap for this screen */
  74.  
  75.     Bool (*CloseScreen)();    /* wrapped screen close */
  76. } MipsScreenRec, *MipsScreenPtr;
  77.  
  78. extern MipsScreenRec mipsScreen[];
  79.  
  80. #define    MipsScreenToPriv(scr)    (&mipsScreen[(scr)->myNum])
  81. #define    MipsScreenNumToPriv(n)    (&mipsScreen[(n)])
  82.  
  83. #endif /* __DDX_MIPSFB_H */
  84.